package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the PAGO_EN_LINEA_COMP database table.
 * 
 */
@Embeddable
public class PagoEnLineaCompPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private long pagoCompId;
	private long pagoEnLineaId;

    public PagoEnLineaCompPK() {
    }

	@Column(name="PAGO_COMP_ID", unique=true, nullable=false)
	public long getPagoCompId() {
		return this.pagoCompId;
	}
	public void setPagoCompId(long pagoCompId) {
		this.pagoCompId = pagoCompId;
	}

	@Column(name="PAGO_EN_LINEA_ID", unique=true, nullable=false)
	public long getPagoEnLineaId() {
		return this.pagoEnLineaId;
	}
	public void setPagoEnLineaId(long pagoEnLineaId) {
		this.pagoEnLineaId = pagoEnLineaId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PagoEnLineaCompPK)) {
			return false;
		}
		PagoEnLineaCompPK castOther = (PagoEnLineaCompPK)other;
		return 
			(this.pagoCompId == castOther.pagoCompId)
			&& (this.pagoEnLineaId == castOther.pagoEnLineaId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.pagoCompId ^ (this.pagoCompId >>> 32)));
		hash = hash * prime + ((int) (this.pagoEnLineaId ^ (this.pagoEnLineaId >>> 32)));
		
		return hash;
    }
}